﻿using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using User.API.Data.Core;
using User.API.Data.Mapping;

namespace User.API.Data
{
    public class UserContext
        : DbContext
    {
        public UserContext(DbContextOptions<UserContext> options) 
            : base(options)
        {}
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfiguration(new ApplicationUserMap());
            base.OnModelCreating(modelBuilder);
        }
        public virtual DbSet<ApplicationUser> ApplicationUser { get; set; }
    }
}
